package com.heima.user.client;

import com.heima.apis.user.IUserClient;
import com.heima.model.user.pojos.ApUser;
import com.heima.user.service.ApUserService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
public class UserClient implements IUserClient {

    private final ApUserService userService;
    /**
     * 根据id查询用户信息
     * @param id
     * @return
     */
    @Override
    public ApUser findUserById(Integer id) {
        return userService.getById(id);
    }
}
